Repository navigation
nns_anova: pooled grand mean and median, median robust estimate (book ch15) - #175
Closed
gitRasheed wants to merge 1 commit into
Closed
gitRasheed wants to merge 1 commit into
gitRasheed wants to merge 1 commit into
Conversation
gitRasheed
force-pushed
the
rasheed/book-anova-grand-mean
branch
from
November 2, 2026 04:12
81fd345 to
2035b9d
Compare
gitRasheed
force-pushed
the
rasheed/book-optim-pi
branch
from
November 2, 2026 04:12
d9e100b to
65ce1ee
Compare
…-grand-mean-medians)
Mirrors R's anova-grand-mean-medians branch (NNS.ANOVA), including the
NaN-skipping robust median.
- Multi-group: the grand statistic was the unweighted mean of the group
means (or medians). It is now the mean (or median) of all observations
pooled, so group sizes count.
- Two-sample with medians=True: the grand median was the size-weighted
mean of the two medians; it is now the median of both samples pooled.
The mean path was already size-weighted and is unchanged.
- robust=True reports the median of the finite bootstrap certainties
instead of NNS.gravity of them.
Before -> after (= R):
three Exp groups, n = 12/60/25, Certainty 0.1274 -> 0.1403
medians=True 0.1702 -> 0.1677
two-sample Exp(1) n=40 vs Exp(1.4) n=90, medians=True, Grand_Statistic
0.9764 -> 0.9644
same pair, robust=True, seed 3, Robust Certainty Estimate
0.7005 -> 0.6861
23 NNS.ANOVA.custom entries (the medians and robust cases) predate the R
change and were refilled; the other 25 came back identical. Two entries
are added for the new multi-group test.
gitRasheed
force-pushed
the
rasheed/book-optim-pi
branch
from
November 2, 2026 23:09
65ce1ee to
a48cdc3
Compare
gitRasheed
force-pushed
the
rasheed/book-anova-grand-mean
branch
from
November 2, 2026 23:09
2035b9d to
6107835
Compare
Contributor
|
Incorporated through NNS R 14.0 integration #192, merged as |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Multi-group
nns_anovatook the grand statistic as the unweighted mean of the group means or medians, so group sizes did not count, while book ch15 pools the observations (ch15:532-536) and uses the combined median (ch15:593). The two-sample medians path took a size-weighted mean of the two medians, and the robust estimate wasNNS.gravityof the bootstrap certainties where ch15:617 says median or mean. We mirror OVVO-Financial/NNS#89, which makes R follow the book, including its NaN-skipping robust median. That PR changes the method, so the R author may close it; if so, this slice should be dropped too.Stacked on #174; merge with a merge commit.
Changes
medians=True.medians=True: the grand median is the median of both samples pooled. Exp(1) n = 40 against Exp(1.4) n = 90 goes from Grand_Statistic 0.9764 to 0.9644. The mean path was already size-weighted.robust=Truereports the median of the finite bootstrap certainties. The same pair with seed 3 goes from 0.7005 to 0.6861. This also removes a property-test case where the robust estimate sat above its upper interval bound.Tests
23
NNS.ANOVA.customentries for the medians and robust cases predate the R change and are refilled; the other 25 came back identical. Two entries are added for the new multi-group test. The parity cache encodes R 13.3 plus the fixes in OVVO-Financial/NNS#73-#92.Mirrors OVVO-Financial/NNS#89
Review
GPT-6.1 Sol reviewed this slice and found nothing. It compared unequal groups, pooled medians, ties and seeded robust estimates against R.